#include <iostream>
#include <vector>
#include <deque>
using namespace std;
//从vector里面初始化一个string
//然后把vector放到deque里面
class String{
public:
    String(int volomn){
        vec.reserve(volomn);
    }    
    friend ostream & operator<<(ostream &os,const String & s);
    vector<char> vec;
};

ostream & operator<<(ostream &os,const String & s){
    for(auto ele:s.vec){
        os<<ele;
    }
    return os;
}

void operate_cin(vector<char> & vec,deque<vector<char>> & dq){
    int flat=0;
    char input_char;
    while(flat<2){
    input_char=cin.get();
    if(input_char=='\n'){
        ++flat;
        vec.push_back(input_char);
        dq.push_back(vec);
        vec.clear();
    }else{
        flat=0;
        vec.push_back(input_char);
    }
    }
}
void test(){
    String s(10);
    deque<vector<char>> dq;
    operate_cin(s.vec,dq);
    for(auto ele:dq){
        for(auto ele2:ele){
            cout<<ele2;
        }
    }
}

int main(int argc, char * argv[]){
    test();
    return 0;
}

